<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<h1 > dom节点</h1>
		<hr>
		<div id="div1">
		</div>
		<p id="p1"> 这个是P1</p>
		<P id="p2"> 这个是P2</P>
	</body>
</html>
<script>
	var para = document.createElement("p");
	var node = document.createTextNode("这个是我通过dom来创建的");
	para.appendChild(node);
	var ele = document.getElementById("div1");
	ele.appendChild(para);
</script>
